package noti;

import java.sql.Connection;
import java.sql.ResultSet;

import com.mysql.jdbc.Statement;

import DB.DBconnection;

public class noti_list {
	public static void main(String[] args) {
		init();		
	}
	
	public static void init() {
		Connection conn = null;
		DBconnection dbConn = null;
		Statement stmt = null;
		ResultSet rs = null;
		
		
		try {
			dbConn = DBconnection.getInstance();
			conn = dbConn.getConnection();
			
			stmt = (Statement) conn.createStatement();
			
			rs = stmt.executeQuery("select * from student");
			
			while (rs.next()) {
				System.out.println(rs.getInt(1)+"");
				System.out.println(rs.getString(2));
			}
			rs.close();
			stmt.close();
			conn.close();
			
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
